package com.zhan.ielts.service;

import java.util.List;
import java.util.Map;

import org.springframework.data.domain.PageImpl;
import org.springframework.data.domain.Pageable;
import org.springframework.web.multipart.MultipartFile;

import com.zhan.frame.core.dao.BaseService;
import com.zhan.ielts.domain.Paragraph;
import com.zhan.ielts.domain.ParagraphWord;
import com.zhan.ielts.domain.query.ParagraphQuery;
import com.zhan.ielts.domain.vo.ParagraphVo;

public interface ParagraphService extends BaseService<Paragraph> {
	public List<String> getType(ParagraphQuery query);

	public List<String> getPassage(ParagraphQuery query);

	public List<Integer> getparagraphNo(ParagraphQuery query);

	public boolean handleParagraph(MultipartFile file) throws Exception;

	public boolean transferParagraph(MultipartFile file) throws Exception;

	public boolean updateTranslation(MultipartFile file) throws Exception;

	public String updateContents(String id, String paragraphContent,
			String paragraphContentCn, String flag);

	public String updateWordContents();

	public Map<String, String> getParaphrase(String id, String word);

	public void removeWord(String id, String word);

	// public void editWord(String id, String word);

	public PageImpl<ParagraphVo> queryPageListCustom(ParagraphQuery query,
			Pageable pageable);

	public List<Paragraph> querySubtypePassage(ParagraphVo entity);

	public List<ParagraphVo> queryBySeqNo(ParagraphVo entity);

	public void handleSentence();

	public void encryptSentence();
	
	//******add or update for ielts
	public String addWord(ParagraphWord paragraphWord); 

	public String minusWord(ParagraphWord paragraphWord); 

	public String editParagraphAndWord(ParagraphVo entity) throws Exception;
	
	public ParagraphVo editCustomView(String id, String word, String page) throws Exception;

	public String editTranslation(ParagraphVo entity);
	
	public void handleParagraphWord(MultipartFile file);
	
	public void handleParagraphWordIncreasement(MultipartFile file);
	
	public void handleWordScene(MultipartFile file);

	public void handleWordSynonym(MultipartFile file);

	public void handleParagraphWithTime(MultipartFile file);
	
	public void handleSentenceExtend(MultipartFile file);

	
	public void updateWordSynonymSeqInBatch();

	public void oneKeyUpdate();
}
